#if !defined(__APP_BT_H)
#define __APP_BT_H

#define _GNU_SOURCE

#include "app_serial.h"
int app_bt_init(device_t *device);

int app_bt_post_read(char *data, int len);

int app_bt_pre_write(char *data, int len);

typedef enum {
    BT_BR_9600 = '4',
    BT_BR_115200 = '8',
} BT_BR;

// 判断蓝牙连接状态
int app_bt_status(device_t *device);

// 修改蓝牙名称
int app_bt_rename(device_t *device, char *name);

// 修改蓝牙波特率
int app_bt_setBaudRate(device_t *device,  BT_BR baudRate);

// 重启蓝牙
int app_bt_reset(device_t *device);

// 设置蓝牙的组网ID
int app_bt_setNetId(device_t *device, char *netId);

// 设置蓝牙的mac地址
int app_bt_setMaddr(device_t *device, char *maddr);
#endif // __APP_BT_H
